package IMIC.NGUYENVANTINH.OOP.LEVEL2.EX5;

import java.text.DecimalFormat;

public class Views {
	public static void main(String[] args) {
		DecimalFormat df = new DecimalFormat("#.##");
		// Khoi dung Stock

		Stock stock = new Stock();
		// set values for stock
		stock.setNameStock("SUNW");
		stock.setNameStock("Sun MicroSystems Inc");
		stock.setPreviousClosingPrice(100);
		stock.setCurrentPrice(90);
		// Khoi tao Controllers;
		Controllers ctrl = new Controllers();
		// Tu controllers goi ham thuc thi
		System.out.println("Price change percentage: " + df.format(ctrl.changePercent(stock))+"%");
	}
}
